package cn.hjh.dao.user;

import cn.hjh.entity.User;
import org.apache.ibatis.annotations.Param;
import org.junit.Test;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface UserMapper {

    public List<User> getUserList(@Param("userName")String userName,
                                  @Param("userRole")Integer roleId,
                                  @Param("from")Integer currentPageNo,
                                  @Param("pageSize")Integer pageSize);

    public int modify(User user);

    /**
     * 根据用户角色列表，获取该角色列表下用户列表信息
     * @param
     * @return
     */
    public List<User> getUserByRoleId_foreach_array(Integer roleIds);

    public List<User> getUserByRoleId_foreach_list(List<Integer> roleList);

    public List<User> getUserByConditionMap_foreach_map(Map<String,Object> conditionMap);

    public List<User> getUserByRoleId_foreach_map(Map<String,Object> roleMap);


    public List<User> getUserList_choose(@Param("userName")String userName,
                                         @Param("userRole")Integer roleId,
                                         @Param("userCode")String userCode,
                                         @Param("creationDate")Date creationDate);

    public  int count();

}
